{% extends "base2.html" %}

{% block title %}Retirada de valor{% endblock %}

{% block conteudo %}

<section class="ajuda">
<h2>Adicionar ou retirar valor</h2>

{% autoescape off %}
{% if mensagem %}
<p id="mensagem">{{ mensagem }}</p>
{% endif %}

{% if aviso %}
<p id="aviso">{{ aviso }}</p>
{% endif %}
{% endautoescape %}

<form class="form-inline" role="form" action="/pagamentos/retiradas/" method="POST">
    {% csrf_token %}
    <div class="form-group">
        <input class="form-control" type="number" min="0" step="0.01" name="valor" placeholder="R$ 0,00" autofocus required />
    </div>
    
    <div class="form-group">
        <select class="form-control" name="usuario_id">
            <option value="0">- - -</option>
            {% for usuario in usuarios %}
            <option value="{{ usuario.id }}">{{ usuario }}</option>
            {% endfor %}
        </select>
    </div>
    
    <div class="form-group">
        <input class="form-control" type="text" name="observacao" placeholder="Observação" />
    </div>
    
    <div class="form-group">
        <select class="form-control" name="tipo">
            <option value="1">Retirar</option>
            <option value="0">Receber</option>
        </select>
    </div>
    
    <button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-ok"></span></button>
</form>

</section>
{% endblock %}

